package com.zzyl.service;

import com.zzyl.base.PageResponse;
import com.zzyl.dto.ReservationDto;
import com.zzyl.vo.ReservationRestCountVo;
import com.zzyl.vo.ReservationVo;

import java.util.List;

/**
 * @Description CustomerReservationService
 * @Author loe
 * @Date 2024-07-12
 */
public interface CustomerReservationService {

    /**
     * 获取取消预约的次数
     * @return
     */
    Integer getCancelledReservationCount();

    /**
     * 分页查询预约
     * @param pageNum 页码
     * @param pageSize 每页数量
     * @param status 状态
     * @return
     */
    PageResponse<ReservationVo> limitSearch(Integer pageNum, Integer pageSize, Integer status);

    /**
     * 查询每个时间段剩余预约次数
     * @return
     */
    List<ReservationRestCountVo> getRestReservationCount(Long time);

    /**
     * 新增预约
     *
     * @param reservationDto
     * @return
     */
    void insertReservation(ReservationDto reservationDto);

    /**
     * 取消预约
     * @param id
     */
    void cancelReservation(Long id);

    /**
     * 更新预约状态
     */
    void updateExpiredReservations();


}
